package org.lds.message.center.admin.business.app.converter;

import org.lds.message.center.admin.business.app.entity.App;
import org.lds.message.center.admin.business.app.model.request.AppBaseListPageRequest;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;


@Component
public class AppBaseListPageRequestToEntityConverter implements Converter<AppBaseListPageRequest, App> {

    @Override
    public App convert(AppBaseListPageRequest source) {
        return App.builder()
                .id(source.getId())
                .name(source.getName())
                .desc(source.getDesc())
                .enable(source.getEnable())
                .createTime(source.getCreateTime())
                .updateTime(source.getUpdateTime())
                .build();
    }

}


